<template>
    <div class="detail">
        
        <van-nav-bar
            title="详情页"
            left-text="返回"
            right-text="按钮"
            left-arrow
            @click-left="$router.go(-1)"
        />
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item v-for="(item,index) in list.imager" :key="index">
            <img :src="item.img" alt="">
        </van-swipe-item>
        </van-swipe>
        <van-goods-action>
  <van-goods-action-icon icon="chat-o" text="客服" @click="onClickIcon" />
  <van-goods-action-icon icon="cart-o" text="购物车" @click="onClickIcon" />
  <van-goods-action-icon icon="shop-o" text="店铺" @click="onClickIcon" />
  <van-goods-action-button
    type="danger"
    text="立即购买"
    @click="onClickButton"
  />
</van-goods-action>
    </div>
</template>

<script>
import { Toast } from 'vant';
export default {
    name: 'detail',

    data() {
        return {
            list:{}
        };
    },

    mounted() {
        
    },

    methods: {
        onClickIcon() {
      Toast('点击图标');
    },
    onClickButton() {
      Toast('点击按钮');
    },
    },
    created () {
        this.list = this.$route.query.lister
        console.log(this.list);
    }
};
</script>

<style lang="scss" scoped>
img{
    width: 100%;
}
</style>